<?

if(isset($this->breadcrumbs)){
	echo '<div id="nav">';
	$this->widget('zii.widgets.CBreadcrumbs', array(
		'links'=>$this->breadcrumbs,
	));
	echo '</div>';
}

$flashes = Yii::app()->user->getFlashes();
if(!empty($flashes)){
    foreach($flashes as $key=>$mes){
        $class = array('alert-message', 'block-message', 'type'=>'info');
		if(strpos($key, 'warning')!==false) $class['type'] = 'warning';
		if(strpos($key, 'success')!==false) $class['type'] = 'success';
		if(strpos($key, 'error')!==false) $class['type'] = 'error';

		echo '<div class="'.implode(' ', $class).'">'.$mes.'</div>';
    }
}
